import http from '@/api'
import { UniCloudParams } from '../interface'

/**
 * 角色管理模块
 */
// 获取用户列表
export const getRoleListApi = (params?: UniCloudParams<any>) => {
  return http.post(`/mo-admin/getRoles`, params)
}

export const addRoleApi = (params: UniCloudParams<any>) => {
  return http.post(`/mo-admin/addRole`, params)
}

export const updateRoleApi = (params: UniCloudParams<any>) => {
  return http.post(`/mo-admin/updateRole`, params)
}

export const updateRoleMenuApi = (params: UniCloudParams<any>) => {
  return http.post(`/mo-admin/updateRoleMenu`, params)
}

export const deleteRoleApi = (params: UniCloudParams<any>) => {
  return http.post(`/mo-admin/deleteRole`, params)
}
